<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <button onclick="doAxiosGet()">get</button>
    <button onclick="doAxiosPost()">pout</button>
    <button></button>
    <button></button>
    <button></button><br>
    <span></span>
</div>

<script type="application/javascript" src="axios.min.js"></script>
<script>
    function doAxiosGet() {
        axios.get("http://localhost:8081/doAxiosGet?name=name").then(function(result){
            document.getElementsByTagName("span")[0].innerHTML = JSON.stringify(result.data);
        })
    }


    function doAxiosPost(){
        axios.post("http://localhost:8081/doAxiosPost",{
                "name":"姿姿态",
                "letter":"亚托谢特"
        })
        .then(function (result) {
            document.getElementsByTagName("span")[0].innerHTML = JSON.stringify(result.data);
        })
    }

</script>
</body>
</html>